def strcmp(a, b):
	return cmp(str(a)+str(b), str(b)+str(a))

class Solution:
	# @param num, a list of integers
	# @return a string
	def largestNumber(self, num):
		str_list = [str(sub) for sub in num]
		str_list = sorted(str_list, cmp=strcmp, reverse=True)
		ans = "".join(str_list).lstrip('0')
		if len(ans) > 0:
			return ans
		else:
			return '0'

if __name__ == '__main__':
	so = Solution()
	a = [0,1]
	print so.largestNumber(a)
